Skip to content

added support for response_cost for LiteLLM model for non streaming response#197

Closed
thetushargoyal wants to merge 2 commits into
google:mainfrom
thetushargoyal:main
Closed

added support for response_cost for LiteLLM model for non streaming response#197
thetushargoyal wants to merge 2 commits into
google:mainfrom
thetushargoyal:main

Conversation

@thetushargoyal

Copy link
Copy Markdown

I have added another field in LlmResponse -> response_cost, that is returned after every call to the LLM by LiteLLM response object.

Now if you want to keep track for per event cost and as well as the entire session cost, you and it in the after_model_callback and store it in a state variable

@google-cla

google-cla Bot commented Apr 15, 2025

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant